package jp.ne.hatena.d.digitalsoul.warikan.web

import org.apache.wicket.util.resource._
import org.apache.wicket.util.resource.locator._

class HtmlFileLocator(val pagesPath:String) extends ResourceStreamLocator {
	
	override def locate(clazz:Class[_], path:String):IResourceStream = {
		var targetPath:String = path
		if(path.indexOf(pagesPath) != -1) {
			targetPath = path.substring(pagesPath.length() + 1)
		}
		super.locate(clazz, targetPath)
	}

}